﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddOpToCategory.aspx.cs" MasterPageFile="~/Admin/Admin.Master"
    Inherits="TimKen.Web.Admin.PAttribute.AddOpToType" %>

<asp:Content ContentPlaceHolderID="ContentLinkAction" runat="server" ID="link">
    <span class="action-span"><a href="CategoryOption_List.aspx?CategoryID=<%=CategoryID%>">
        <%=GetLangString("CategoryOptionList")%></a></span>
</asp:Content>
<asp:Content ContentPlaceHolderID="ContentTitle" runat="server" ID="title">
    <%=GetLangString("AddOptionToCategory")%>
</asp:Content>
<asp:Content ContentPlaceHolderID="ContentMain" runat="server" ID="main">
    <div class=" form-div">
        <%=GetLangString("OptionFieldType")%>：<asp:DropDownList ID="dplAttrType" runat="server">
        </asp:DropDownList>
        <%=GetLangString("OptionName")%>：<asp:TextBox ID="txtAttrName" runat="server"></asp:TextBox>
        <asp:Button ID="btFilter" runat="server" CssClass=" button" OnClick="btFilter_Click" />
        <asp:Button ID="btNoFilter" runat="server" CssClass=" button" OnClick="btNoFilter_Click" />
    </div>
    <div class="list-div">
        <asp:GridView ID="grdOption" runat="server" CssClass="grid" AutoGenerateColumns="False">
            <Columns>
                <asp:TemplateField>
                    <ItemStyle Width="40" HorizontalAlign="Center" />
                    <HeaderTemplate>
                        <%=GetLangString("ItemForSelect")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <input id="POption" name="POption" value='<%#Eval("OptionID") %>' type="checkbox" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="80" HorizontalAlign="Center" />
                    <HeaderTemplate>
                        <%=GetLangString("IsSearchAble")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <input id="POptionIndex" name="POptionIndex" value='<%#Eval("OptionID") %>' type="checkbox" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <%=GetLangString("OptionName")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("OptionName")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <%=GetLangString("FieldMetaData")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("FieldMetaData")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="150" HorizontalAlign="Center" />
                    <HeaderTemplate>
                        <%=GetLangString("FieldType")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#GetOptionType(Eval("FieldType").ToString()) %></ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <HeaderStyle HorizontalAlign="Center" />
        </asp:GridView>
        <div class="pager-div">
            <table>
                <tr>
                    <td>
                        <asp:Button ID="btnAddToCategroy" runat="server" CssClass="button" OnClick="btnAddToCategroy_Click" />
                        &nbsp;&nbsp;
                        <asp:Button ID="btnAddToCategroyComplete" runat="server" CssClass="button" OnClick="btnAddToCategroyComplete_Click" />
                    </td>
                    <td>
                        <ux:AspNetPager ID="AspNetPager1" runat="server" HorizontalAlign="right" PageIndexBoxType="DropDownList"
                            OnPageChanged="AspNetPager1_PageChanged" ImagePath="/images/" 
                        NavigationButtonType="Image" ButtonImageNameExtension="n" 
                        CpiButtonImageNameExtension="r" PagingButtonType="Image">
                        </ux:AspNetPager>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
